package org.u2ml.stack.xml.xstream;

import org.u2ml.app.domain.ProjectDiagram;

import com.thoughtworks.xstream.converters.SingleValueConverter;

public class CustomDiagramConverter implements SingleValueConverter {

	public Object fromString(String oid) {
		ProjectDiagram u = new ProjectDiagram();
		u.setOid(Long.parseLong(oid));
		return null;
	}

	public String toString(Object diag) {
		return ((ProjectDiagram) diag).getOid().toString();
	}

	public boolean canConvert(Class type) {
		return type.equals(ProjectDiagram.class);
	}

}
